﻿using System;
using System.Threading.Tasks;

namespace Thread01
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            ThreadStart01();
            ThreadStart02();
            ThreadStart03();
            ThreadStart04();
            ThreadStart05();

            Console.ReadKey();
        }


        public static void ThreadStart01()
        {
            Task task = Task.Run(() =>
            {
                while (true)
                {
                    Console.WriteLine($"Task01:{DateTime.Now.ToString()}");
                }
            });
        }
        public static void ThreadStart02()
        {
            Task task = Task.Run(() =>
            {
                while (true)
                {
                    Console.WriteLine($"Task02:{DateTime.Now.ToString()}");
                }
            });
        }

        public static void ThreadStart03()
        {
            Task task = Task.Run(() =>
            {
                while (true)
                {
                    Console.WriteLine($"Task03:{DateTime.Now.ToString()}");
                }
            });
        }

        public static void ThreadStart04()
        {
            Task task = Task.Run(() =>
            {
                while (true)
                {
                    Console.WriteLine($"Task04:{DateTime.Now.ToString()}");
                }
            });
        }

        public static void ThreadStart05()
        {
            Task task = Task.Run(() =>
            {
                while (true)
                {
                    Console.WriteLine($"Task05:{DateTime.Now.ToString()}");
                }
            });
        }
    }
}
